package il.ac.technion.wiki.api.search;


/**
 * Represents a search expression that must <i>not</i> match the specified
 * search expression.
 */
public class NotSearchExpression implements ISearchExpression {
	@Override
	public int numberOfOperands() {
		return 1;
	}

	@Override
	public String toString() {
		return "~"+exp;
	}

	/**
	 * Creates a new NotSearchExpression.
	 * @param exp	The sub-expression that is to be negated.
	 */
	public NotSearchExpression(ISearchExpression exp) {
		this.exp = exp;
	}
	
	/**
	 * The sub-expressions that must not match, in order to match this search expression.
	 */
	public final ISearchExpression exp;
}
